package jvm;

import java.util.ArrayList;
import java.util.List;

public class Jit {
    public static void main(String[] args) {
        System.out.println( Runtime.getRuntime().maxMemory());
        System.out.println( Runtime.getRuntime().totalMemory());
        // 128974848   255328256
        // 128974848
        List<Integer> lsit0=new ArrayList<Integer>();
        long start0=System.currentTimeMillis();
        for(int i=0;i<10000000;i++){
            lsit0.add(i);
        }
        System.out.println(System.currentTimeMillis()-start0);

        List<Integer> lsit1=new ArrayList<Integer>();
        long start1=System.currentTimeMillis();
        for(int i=10000000;i<20000000;i++){
            lsit1.add(i);
        }
        System.out.println(System.currentTimeMillis()-start1);
    }
}
